<script>
	export default {
		globalData: {
			isLogin: false,
			nickname: '',
			avatar: '',
			gender: 0,
			openid: '',
			articleList: []
		},
		onLaunch: function() {
			console.log('App Launch')
			let user_info = uni.getStorageSync('user_info')
			console.log(user_info)
			if (user_info) {
				this.globalData.isLogin = true
				this.globalData.openid = user_info.openid || ''
				this.globalData.nickname = user_info.nickname
				this.globalData.avatar = user_info.avatar
				this.globalData.gender = user_info.gender
			}
			
			let articleList = uni.getStorageSync('articleList')
			if (Array.isArray(articleList) && articleList.length) {
				this.globalData.articleList = articleList
			}
		},
		onShow: function() {
			console.log('App Show')
		},
		onHide: function() {
			console.log('App Hide')
		}
	}
</script>

<style>
	/*每个页面公共css */
	@font-face {
	  font-family: "iconfont"; /* Project id 2724103 */
	  src: url('//at.alicdn.com/t/font_2724103_lcozkgbjago.woff2?t=1628144270036') format('woff2'),
	       url('//at.alicdn.com/t/font_2724103_lcozkgbjago.woff?t=1628144270036') format('woff'),
	       url('//at.alicdn.com/t/font_2724103_lcozkgbjago.ttf?t=1628144270036') format('truetype');
	}
	
	.iconfont {
	  font-family: "iconfont" !important;
	  font-size: 20rpx;
	  font-style: normal;
	  -webkit-font-smoothing: antialiased;
	  -moz-osx-font-smoothing: grayscale;
	}
	
	.icon-write:before {
	  content: "\e6f3";
	}
	
	.icon-draft:before {
	  content: "\e6f4";
	}
	
	.icon-send:before {
	  content: "\e6f5";
	}
	
	.icon-hot:before {
	  content: "\e6f6";
	}
	
	.icon-like:before {
	  content: "\e6f7";
	}
	
	.icon-delete:before {
	  content: "\e6f8";
	}
	
	.icon-setting:before {
	  content: "\e6f9";
	}
	
	.icon-notice:before {
	  content: "\e6fa";
	}
	
	.icon-comment:before {
	  content: "\e6fb";
	}
	
	
	page {
		min-height: calc(100vh - 100rpx);
		color: #313651;
		background-color: #f3f3f5;
	}
</style>
